@extends('admin/layout')

@section('content')
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li><a href="#">自助订单管理</a></li>
                <li class="active">订单预览</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-md-12" style="width: 100%;">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">内容</h3>
                        </div>
                        <span id="msg" style="display: none">
                            @if (count($errors) > 0)
                                @foreach ($errors->all() as $error)
                                    <div style="width: 100%;">
                                        <span style="color: red;display: block;margin: 0px auto;width: 200px;text-align: center;">{{ $error }}</span>
                                    </div>
                                @endforeach
                            @else
                                <div style="width: 100%;">
                                    <span style="color: green;display: block;margin: 0px auto;width: 200px;text-align: center;">{{ Session::get('msg') }}</span>
                                </div>
                            @endif
                        </span>
                        <script type="text/javascript">
                            var _msg = $('#msg div span').text();
                            console.log(_msg);
                            if(_msg != ''){
                                layer.msg(_msg);
                            }
                        </script>
                        <div>
                            <table  class="table table-striped table-bordered table-hover table-condensed table-responsive" >
                                <tr style="background:#ccc;">
                                    <th>商品图片</th>
                                    <th>商品信息</th>
                                    <th>单价</th>
                                    <th>数量</th>
                                    <th>支付总金额</th>
                                </tr>
                                <tr class="active">
                                    <td colspan="5" style="text-align:left;line-height:40px;padding:0px;">
                                        <span style="color:grey;">下单时间：</span>
                                        <span>{{ $list['create_time'] }}</span>
                                        <span style="width:30px;height:40px;">&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                        <span style="color:grey;">订单编号：</span>
                                        <span>{{ $list['order_id'] }}</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <img src="/productImg/{{ $list['pic'] }}" width="130px" height="100px" class="img-thumbnail">
                                    </td>
                                    <td>
                                        {{ $list['name'] }}
                                    </td>
                                    <td>
                                        <span>￥</span>
                                        <span>{{ $list['price'] }}</span>
                                    </td>
                                    <td>{{ $list['goods_num'] }}</td>
                                    <td>{{ $list['total_price'] }}</td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <!-- /.row -->
                </div>
            </div>
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
@stop